3.160 \(\int \sec ^2(e+f x) (a+b \sec ^2(e+f x)) \, dx\)

Optimal. Leaf size=43 \[ \frac{(3 a+2 b) \tan (e+f x)}{3 f}+\frac{b \tan (e+f x) \sec ^2(e+f x)}{3 f} \]

[Out]

((3*a + 2*b)*Tan[e + f*x])/(3*f) + (b*Sec[e + f*x]^2*Tan[e + f*x])/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0383772, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.143, Rules used = {4046, 3767, 8} \[ \frac{(3 a+2 b) \tan (e+f x)}{3 f}+\frac{b \tan (e+f x) \sec ^2(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^2*(a + b*Sec[e + f*x]^2),x]

[Out]

((3*a + 2*b)*Tan[e + f*x])/(3*f) + (b*Sec[e + f*x]^2*Tan[e + f*x])/(3*f)

Rule 4046

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> -Simp[(C*Cot[
e + f*x]*(b*Csc[e + f*x])^m)/(f*(m + 1)), x] + Dist[(C*m + A*(m + 1))/(m + 1), Int[(b*Csc[e + f*x])^m, x], x]
/; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] &&  !LeQ[m, -1]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \sec ^2(e+f x) \left (a+b \sec ^2(e+f x)\right ) \, dx &=\frac{b \sec ^2(e+f x) \tan (e+f x)}{3 f}+\frac{1}{3} (3 a+2 b) \int \sec ^2(e+f x) \, dx\\ &=\frac{b \sec ^2(e+f x) \tan (e+f x)}{3 f}-\frac{(3 a+2 b) \operatorname{Subst}(\int 1 \, dx,x,-\tan (e+f x))}{3 f}\\ &=\frac{(3 a+2 b) \tan (e+f x)}{3 f}+\frac{b \sec ^2(e+f x) \tan (e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 0.0878204, size = 36, normalized size = 0.84 \[ \frac{a \tan (e+f x)}{f}+\frac{b \left (\frac{1}{3} \tan ^3(e+f x)+\tan (e+f x)\right )}{f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^2*(a + b*Sec[e + f*x]^2),x]

[Out]

(a*Tan[e + f*x])/f + (b*(Tan[e + f*x] + Tan[e + f*x]^3/3))/f

________________________________________________________________________________________

Maple [A]  time = 0.028, size = 35, normalized size = 0.8 \begin{align*}{\frac{1}{f} \left ( a\tan \left ( fx+e \right ) -b \left ( -{\frac{2}{3}}-{\frac{ \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{3}} \right ) \tan \left ( fx+e \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^2*(a+b*sec(f*x+e)^2),x)

[Out]

1/f*(a*tan(f*x+e)-b*(-2/3-1/3*sec(f*x+e)^2)*tan(f*x+e))

________________________________________________________________________________________

Maxima [A]  time = 1.02257, size = 46, normalized size = 1.07 \begin{align*} \frac{{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} b + 3 \, a \tan \left (f x + e\right )}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2*(a+b*sec(f*x+e)^2),x, algorithm="maxima")

[Out]

1/3*((tan(f*x + e)^3 + 3*tan(f*x + e))*b + 3*a*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [A]  time = 0.458157, size = 95, normalized size = 2.21 \begin{align*} \frac{{\left ({\left (3 \, a + 2 \, b\right )} \cos \left (f x + e\right )^{2} + b\right )} \sin \left (f x + e\right )}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2*(a+b*sec(f*x+e)^2),x, algorithm="fricas")

[Out]

1/3*((3*a + 2*b)*cos(f*x + e)^2 + b)*sin(f*x + e)/(f*cos(f*x + e)^3)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \sec ^{2}{\left (e + f x \right )}\right ) \sec ^{2}{\left (e + f x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**2*(a+b*sec(f*x+e)**2),x)

[Out]

Integral((a + b*sec(e + f*x)**2)*sec(e + f*x)**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.26565, size = 50, normalized size = 1.16 \begin{align*} \frac{b \tan \left (f x + e\right )^{3} + 3 \, a \tan \left (f x + e\right ) + 3 \, b \tan \left (f x + e\right )}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2*(a+b*sec(f*x+e)^2),x, algorithm="giac")

[Out]

1/3*(b*tan(f*x + e)^3 + 3*a*tan(f*x + e) + 3*b*tan(f*x + e))/f